package com.landcode.netty.handler;

import io.netty.channel.Channel;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.mqtt.MqttFixedHeader;
import io.netty.handler.codec.mqtt.MqttMessage;
import lombok.extern.slf4j.Slf4j;

import org.springframework.stereotype.Component;


@Slf4j
@ChannelHandler.Sharable
@Component
public class MqttServerHandlerDispather extends AbstractMqttHandler {
	
	@Override
	protected void doMessage(ChannelHandlerContext ctx, MqttMessage mqttMessage) {
		Channel channel = ctx.channel();
		MqttFixedHeader mqttFixedHeader = mqttMessage.fixedHeader();

		if (channel != null){
			switch (mqttFixedHeader.messageType()) {
				case CONNECT:

				case PINGREQ:

				case PUBLISH:
			}
		}

	}
}
